package com.jet.stock.gate;

import com.jet.core.result.ResultJson;
import com.jet.stock.service.StockRecordReasonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/gate/stock/record-reason")
public class GateStockRecordReasonController {

    @Resource
    private StockRecordReasonService stockRecordReasonService;

    @GetMapping("/list")
    public ResultJson list(@RequestHeader long merchantNo,
                           @RequestHeader long storeNo,
                           @RequestHeader String accountId) {
        return ResultJson.ok(stockRecordReasonService.findAll(merchantNo));
    }
}
